package com.example.sicnuaccountingapp.ui.home

import com.example.sicnuaccountingapp.data.entity.Transaction

sealed class HomeUiState {
    object Loading : HomeUiState()
    data class Success(
        val transactions: Map<String, List<Transaction>>,
        val summary: TransactionSummary
    ) : HomeUiState()
    data class Error(val message: String) : HomeUiState()
}

data class TransactionSummary(
    val totalIncome: Double,
    val totalExpense: Double
) {
    val balance: Double
        get() = totalIncome - totalExpense
} 